package com.gzx.spring.db.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gzx.spring.db.entity.RiskWhite;
import com.gzx.spring.db.mapper.RiskWhiteMapper;
import com.gzx.spring.db.service.RiskWhiteService;

import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class RiskWhiteServiceImpl extends ServiceImpl<RiskWhiteMapper, RiskWhite> implements RiskWhiteService {

	@Override
	public boolean isWhite(String id) {
		QueryWrapper<RiskWhite> queryWrapper = new QueryWrapper<>();
		queryWrapper.eq("id_card", id);
		List<RiskWhite> datas = list(queryWrapper);
		if (datas == null || datas.size() == 0) {
			return false;
		} else {
			return true;
		}
	}
}
